﻿using System;

namespace MessagePack.Formatters
{
	// Token: 0x02000046 RID: 70
	public class BooleanFormatter : IMessagePackFormatter<bool>
	{
		// Token: 0x06000107 RID: 263 RVA: 0x00004943 File Offset: 0x00002D43
		private BooleanFormatter()
		{
		}

		// Token: 0x06000108 RID: 264 RVA: 0x0000494B File Offset: 0x00002D4B
		public int Serialize(ref byte[] bytes, int offset, bool value, IFormatterResolver formatterResolver)
		{
			return MessagePackBinary.WriteBoolean(ref bytes, offset, value);
		}

		// Token: 0x06000109 RID: 265 RVA: 0x00004955 File Offset: 0x00002D55
		public bool Deserialize(byte[] bytes, int offset, IFormatterResolver formatterResolver, out int readSize)
		{
			return MessagePackBinary.ReadBoolean(bytes, offset, out readSize);
		}

		// Token: 0x0400003A RID: 58
		public static readonly BooleanFormatter Instance = new BooleanFormatter();
	}
}
